import { _decorator, Component, Node } from 'cc';
import { PieceManagerBase } from './PieceManagerBase';
const { ccclass, property } = _decorator;

@ccclass('BingController')
export class BingController extends PieceManagerBase {
    canMoveOrAttck(): Promise<boolean> {
        let isSingleDirection = true;
        let enableBack = false;
        if(this.posY >= 5) isSingleDirection = false;
        return this.qipanController.canLineMoveOrAttck(this, 1, isSingleDirection, enableBack);
    }
    async showAllowedRoute(event: any) {
        if(!super.showAllowedRoute(event)) return;
        await this.canMoveOrAttck();
    }
}

